\documentclass[a4paper, 11pt]{article}
\usepackage{comment} % enables the use of multi-line comments (\ifx \fi) 
\usepackage{lipsum} %This package just generates Lorem Ipsum filler text. 
\usepackage{fullpage} % changes the margin
\usepackage[a4paper, total={7in, 10in}]{geometry}
\usepackage[fleqn]{amsmath}
\usepackage{amssymb,amsthm}  % assumes amsmath package installed
\usepackage{bm}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}{Corollary}
\usepackage{graphicx}
\usepackage{caption}
\captionsetup[figure]{name={图}}
\captionsetup[table]{name={表}}
% \usepackage[pdftex]{graphicx}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{verbatim}
\usepackage[numbered]{mcode}
\usepackage{float}
\usepackage{tikz}
    \usetikzlibrary{shapes,arrows}
    \usetikzlibrary{arrows,calc,positioning}

    \tikzset{
        block/.style = {draw, rectangle,
            minimum height=1cm,
            minimum width=1.5cm},
        input/.style = {coordinate,node distance=1cm},
        output/.style = {coordinate,node distance=4cm},
        arrow/.style={draw, -latex,node distance=2cm},
        pinstyle/.style = {pin edge={latex-, black,node distance=2cm}},
        sum/.style = {draw, circle, node distance=1cm},
    }
\usepackage{xcolor}
\usepackage{mdframed}
\usepackage[shortlabels]{enumitem}
\usepackage{indentfirst}
\usepackage{hyperref}
\usepackage{CJKutf8}
    
\renewcommand{\thesubsection}{\thesection.\alph{subsection}}

\newenvironment{problem}[2][Q]
    { \begin{mdframed}[backgroundcolor=gray!20] \textbf{#1 #2} \\}
    {  \end{mdframed}}

% Define solution environment
\newenvironment{solution}
    {\textit{Solution:}}
    {}

\renewcommand{\qed}{\quad\qedsymbol}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{CJK}{UTF8}{gbsn}
%Header-Make sure you update this information!!!!
\noindent
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\large\textbf{课程: 模式识别} \hfill \textbf{作业 4}   \\
北航软件学院 \\
\normalsize 学期: 2025，春季\hfill 提交截止时间:  2025年06月03日, 11：59 PM \\
\noindent\rule{7in}{2.8pt}
\textbf{提醒注意:}
\begin{itemize}
\item 本次作业发布于2025年05月06日，截止于2025年06月03日。
\item 作业一分为三部分：问答题、实训题、以及实训题报告
\begin{itemize}
    \item 问答题答案可以手写并扫描，或者用latex（或word）手打，最终以QA.pdf文件命名。
    \item 实训题按照项目共享链接内要求和基础代码进行作答，并按要求格式和命名进行保存。
    \item 报告要求按照模板全英文书写，以report.pdf文件命名。
    \item 作业提交格式：$<student ID>$\_$<name>$\_A4.zip。比如ZY1921102\_田嘉怡\_A4.zip
    \item {\color{red}提交的zip文件要求（仅）包括}：
    \begin{itemize}
        \item 问答题答案：QA.pdf
        \item 代码：包括作业代码 a4.ipynb，以及测试结果文件 $<student  ID>$\_a4.csv
        \item 报告：report.pdf
    \end{itemize}
    
\end{itemize}
\item 作业压缩包需要在spoc平台上提交。
\item 每迟交1天（不满1天按1天计算），本次作业扣除10\%分数。
\item 不按作业要求和格式提交，视情况扣分。不得抄袭。
\end{itemize}

\noindent\rule{7in}{1.5pt}
\textbf{第一部分：问答题（共6分）}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Problem 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{problem}{1 迁移学习（2分）}
本课程讨论了前沿课题迁移学习，重点介绍了其中的领域迁移、小样本学习、以及终身学习。请回答以下相关问题。
\begin{enumerate}[(a)]
\item 迁移学习可以分为哪几类？每一类有哪些子问题？
\item 领域迁移也叫领域自适应，通常假设训练数据来自源域，测试数据来自目标域。源域和目标域具有相同的task，但是来自不同的domain。请简述你对domain不同的理解，并列举一些出现测试数据出现domain变化的具体实际例子。
\item 小样本学习(few-shot learning)问题可以用元学习(meta learning)方法解决。请简述元学习方法为什么适用于小样本学习，并列举元学习中可学习的learning function包括哪些。元学习中需要将训练和测试数据变成meta-task的形式，简述为什么要做这种数据变换。
\item 终身学习的主要学习目标是学习新任务的情况下不遗忘旧任务。简述在学习新任务时，模型对旧任务遗忘的主要原因。
\end{enumerate}
% Explain the difference between L1 and L2 regularization
\end{problem}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Problem 2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{problem}{2 对抗攻防（1分）}
训练好的深度（机器）学习模型可能遭受潜在的对抗攻击，导致对数据做微小变化时，模型以极高置信度将原始数据预测为错误的类别。请回答以下相关问题，
\begin{enumerate}[(a)]
\item 什么是白盒攻击和黑盒攻击？
\item 简述Fast Gradient Sign Method (FGSM)~\cite{goodfellow2014explaining}方法对图像的攻击噪声产生的核心思想，分析其为何能够实现对模型的攻击。
\item FGSM约束了噪声大小的哪种度量？这种度量的优势是什么？
\end{enumerate}
\end{problem}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Problem 3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{problem}{3 模型压缩（2分）}
为了能够在边缘端部署深度学习模型，模型压缩方法旨在维持模型性能的前提下减少网络参数量或计算量。请回答以下相关问题，
\begin{enumerate}[(a)]
\item 简述The lottery ticket hypothesis~\cite{frankle2018lottery} 中，实现模型剪枝后性能的较好的关键是什么。
\item 简述知识蒸馏(Knowledge Distillation)~\cite{Hinton2015}方法的核心思想，其中的Temperature的作用是什么？
\item 假设输入channel数是$I$，输出channel数是$O$，kernel size 为$k\times k$，普通卷积层的参数量是多少？Depthwise separable convolution~\cite{chollet2017xception}的参数量是多少？
\end{enumerate}
\end{problem}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Problem 4
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{problem}{4 可解释AI（1分）}
深度学习模型通常包含海量参数，因此其预测结果的可解释性较低。请以图像分类为例，回答以下相关问题，
\begin{enumerate}[(a)]
\item 根据论文~\cite{zeiler2014visualizing}，简述图~\ref{fig:XAI1}中热力图的含义，并简述该热力图的生成方法以及该图如何实现局部可解释。
\item 简述在论文~\cite{yosinskiunderstanding}中全局模型解释方法（参见\href{https://yosinski.com/deepvis}{https://yosinski.com/deepvis}）如何得到图~\ref{fig:XAI2}以及该图体现了模型哪方面的可解释性。
\end{enumerate}
\end{problem}

\begin{figure}[h!]
\centering
\includegraphics[width=0.5\linewidth]{XAI1.png}
\caption{Local Explanation}
\label{fig:XAI1}
\end{figure}


\begin{figure}[h!]
\centering
\includegraphics[width=0.5\linewidth]{XAI2.png}
\caption{Global Explanation}
\label{fig:XAI2}
\end{figure}


\newpage
\noindent\rule{7in}{1.5pt}
\textbf{第二部分：实训题（共20分）}
\\ \\


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Problem 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{problem}{1 基于领域自适应的物体识别 }
\paragraph{1. 实验要求}
\begin{itemize}
    \item 作业要求以及基础代码以Aistudio项目的形式发布。
    \item 发布项目链接有效期3天，请在作业发布3天内fork这个项目，生成``我的项目''，并在自己fork的项目下进行作答，生成答案后按要求保存提交。
\end{itemize}

\paragraph{2. 实验目标}
\begin{itemize}
\item 直观了解数据分布差异对识别结果的影响。
\item  以物体识别为应用，熟悉基于对抗训练的领域自适应（领域迁移）方法。
\item 熟悉对抗训练损失函数设计，以及训练过程的参数设置。
\item 了解其他领域自适应方法对性能的提示。
\end{itemize}

\paragraph{3. 实验内容}
\begin{itemize}
    \item 完成基于领域自适应的物体识别任务。
    \item 实验介绍详情和基础代码参见 Aistudio中的共享项目\href{https://aistudio.baidu.com/projectdetail/9084256}
    {“PR\_2025\_Spring\_A4\_codebase”}。
\end{itemize}


\paragraph{4. 评分细则}
\begin{itemize}
    \item (2分) Submit the zip file containing code and results to the SPOC system.
    \item (4分) Achieve baseline results on validation and target sets by running the provided Source-Only and DaNN implementations without modifying the model architecture.
    \item (5分) Achieve improved results on validation and target sets by implementing DaNN with a properly set hyperparameter $\lambda$.
    \item (6分) Achieve further improved results on validation and target sets by freely modifying the model architecture and hyperparameters, applying learned CNN techniques.
    \item (3分) Achieve results on validation and target sets by implementing the VADA (Virtual Adversarial Domain Adaptation) technique, potentially utilizing the provided code tools.
\end{itemize}
\end{problem}


\noindent\rule{7in}{1.5pt}
\textbf{第三部分：实训题实验报告（共4分）}
\begin{itemize}
    \item 请按照实验报告模板完成实验报告。
\end{itemize}
\bibliographystyle{unsrt}
\bibliography{reference}


\end{CJK}
\end{document}